Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/LizandroCanul/back_sdo/llms.txt

Use this file to discover all available pages before exploring further.

Welcome to Yucatan Public Works API

The Yucatan Public Works API is a robust REST API built with NestJS that provides comprehensive management of public infrastructure projects, municipalities, government dependencies, and related catalogs across Yucatan, Mexico. This API serves as the backend for tracking and managing “obras” (public works) throughout their lifecycle, from planning to completion.

Quick Start

Get up and running in minutes with our quick start guide

Installation

Detailed installation and configuration instructions

API Reference

Explore all available endpoints and their usage

Key Features

The Yucatan Public Works API provides powerful features for managing public infrastructure:

JWT Authentication

Secure authentication with role-based access control (Admin and User roles)

Public Works Management

Complete CRUD operations for managing obras with automatic numbering by fiscal year

Geographic Support

PostGIS integration for storing and querying geographic location data

User Favorites

Allow users to bookmark and track their favorite public works projects

Advanced Filtering

Comprehensive filtering and pagination for all resources

TypeORM Integration

Type-safe database operations with PostgreSQL and TypeORM entities

What the API Manages

The API provides endpoints for managing several core entities:

Obras (Public Works)

The central resource of the API. Each obra represents a public infrastructure project with:
  • Unique identifier and fiscal year tracking
  • Project details (name, description, budget)
  • Geographic location with PostGIS support
  • Status tracking through the project lifecycle
  • Association with municipalities and government dependencies

Municipalities (Municipios)

Geographic divisions representing municipalities across Yucatan, each with their own geographic boundaries and associated public works.

Dependencies (Dependencias)

Government departments and agencies responsible for executing public works projects.

Users

System users with role-based permissions (Admin or User) and the ability to favorite obras for quick access.

Catalogs

Supporting catalog entities including:
  • Localidades: Localities within municipalities
  • Tipo Proyecto: Project types (infrastructure, social, etc.)
  • Estatus Obra: Work status (planning, in progress, completed)
  • Ejercicio Fiscal: Fiscal years for budget tracking

Architecture Overview

The API is built with modern technologies:
  • Framework: NestJS with TypeScript
  • Database: PostgreSQL with PostGIS extension
  • ORM: TypeORM for type-safe database operations
  • Authentication: JWT tokens with Passport.js
  • Validation: Class-validator for request validation
  • API Style: RESTful with JSON payloads
The API runs on port 3000 by default and includes CORS support for cross-origin requests.

Next Steps

Start Building

Follow the quickstart guide to make your first API request

Learn Authentication

Understand how to authenticate and authorize requests